<template>
  <div>
    <div class="top">
      <slot name="titleleft"></slot>
      <div></div>
      <slot name="titleright"></slot>
    </div>
    <div class="cont">
      <ul>
        <li v-for="(item,index) in list" :key="index">
          <slot :item="item" name='contentleft'></slot>
          <slot :item="item" name='contentright'></slot>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: ['list']
};
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.cont ul li{
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid grey;
  padding: 10px;
}
.cont{
  justify-content: space-between;
}

.top {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 4px;
  justify-content: space-between;
  background-color: #bad5f2;

}

</style>
